#include<iostream>
using namespace std;
int main()
{
	char a[20] = { 0 };
	int n, max = 1;
	while (cin >> n)
	{
		for (int i = 1; i<20; i++)
		{
			a[i] = n & 1;
			n = n >> 1;
		}
		for (int i = 1; i<20; i++)
		{
			if (strlen(&a[i])>max)
				max = strlen(&a[i]);
		}
		cout << max << endl;
	}

}
